#_*_coding:utf-8_*_
# class A:
#     def __init__(self):
#         self.n = 'A'
#
# class B(A):
#     pass
#
# class C(A):
#     def __init__(self):
#         self.n = 'C'
#
# class D(B,C):
#     # def __init__(self):
#     #     self.n ='D'
#     pass
#
# obj = D()
# print(obj.n)


# class Dog(object):
#     '''静态方法'''
#     def __init__(self, name):
#         self.name = name
#     @staticmethod  # 把eat方法变为静态方法
#     def eat(self):
#         print("%s is eating" % self.name)
# d = Dog("ChenRonghua")
# d.eat(d)

#
# class Dog(object):
#     '''类方法'''
#     name ='bianliang'
#     def __init__(self, name):
#         self.name = name
#     @classmethod
#     def eat(self):
#         print("%s is eating" % self.name)
# d = Dog("ChenRonghua")
# d.eat()


class Dog(object):
    '''属性方法'''
    def __init__(self, name):
        self.name = name
    @property
    def eat(self):
        print(" %s is eating" % self.name)
d = Dog("ChenRonghua")
d.eat